export default {
	data() {
		return {
			scheduleShiftList: [
				{ id: 1, name: '早班' },
				{ id: 2, name: '晚班' }
			]
		};
	},
	methods: {
		getCurrentTimeScheduleShift() {
			const d = new Date();
			const hour = d.getHours();
			const minute = d.getMinutes();
			if (hour >= 7 && hour <= 19) {
				if (hour === 7) {
					if (minute >= 45) {
						this.$set(this.searchParams, 'groupId', 1);
					} else {
						this.$set(this.searchParams, 'groupId', 2);
					}
				} else if (hour === 19) {
					if (minute <= 44) {
						this.$set(this.searchParams, 'groupId', 1);
					} else {
						this.$set(this.searchParams, 'groupId', 2);
					}
				} else {
					this.$set(this.searchParams, 'groupId', 1);
				}
			} else {
				this.$set(this.searchParams, 'groupId', 2);
			}
		}
	}
};
